package com.gtw;

import com.gtw.decorator.Component;
import com.gtw.decorator.ConcreteComponent;
import com.gtw.decorator.ConcreteDecorator1;
import com.gtw.decorator.ConcreteDecorator2;

public class Client {

    public static void main(String[] args){
        Component component = new ConcreteComponent();
        //第一次装饰
        component = new ConcreteDecorator1(component);
        //第二次装饰
        component = new ConcreteDecorator2(component);
        component.operate();
    }
}
